package com.snack.shop.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 创建代取订单参数
 */
@Data
@Schema(description = "创建代取订单参数")
public class CreatePickupOrderParam {

    @Schema(description = "分类ID")
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    @Schema(description = "取件地址")
    @NotBlank(message = "取件地址不能为空")
    private String pickupAddress;

    @Schema(description = "取件码")
    private String pickupCode;

    @Schema(description = "取件备注")
    private String pickupRemark;

    @Schema(description = "第一组图片（JSON数组字符串：取快递-快递单号截图数组，其他-订单截图数组）")
    private String firstImage;

    @Schema(description = "第二组图片（JSON数组字符串：取快递-身份码截图数组，其他-取餐码截图数组）")
    private String secondImage;

    @Schema(description = "送达地址")
    @NotBlank(message = "送达地址不能为空")
    private String deliveryAddress;

    @Schema(description = "收件人姓名")
    @NotBlank(message = "收件人姓名不能为空")
    private String receiverName;

    @Schema(description = "收件人电话")
    @NotBlank(message = "收件人电话不能为空")
    private String receiverPhone;

    @Schema(description = "配送备注")
    private String deliveryRemark;

    @Schema(description = "服务费用")
    @NotNull(message = "服务费用不能为空")
    @DecimalMin(value = "0.01", message = "服务费用必须大于0")
    private BigDecimal serviceFee;
}

